import tss.client.*;

public class StartClientCLI {
	public static void main(String[] args) throws Exception {
		try {
			Client s = new Client();
			int extensionNumber = s.connectServer("10.11.132.199", 9999);
			System.out.println("Extension Number:" + extensionNumber);
			tss.common.ExtensionStates[] states = s.getExtensionStates();
			for (int i =0; i < states.length; i++)
				System.out.println("Extension State: " + i + " " + states[i]);
			
			if (extensionNumber > 1) {
				s.dialConnection(1);
			}
			
			while(true) {
				Thread.sleep(500);
				System.out.println(s.getLineState());
			}
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
